<!--
描述：教学管理-查看年级专业信息树组件
开发人：hqj
开发日期：2018年8月17日
-->
<template lang="pug">
    div.kalix-article
        keep-alive
            el-row.frame-row(:gutter="10")
                el-col.frame-col(:span="5")
                    kalix-tree(v-bind:treeTitle="'年级专业树'" v-bind:treeDataURL="gradeMajorTreeURL"  v-on:nodeClick="onTreeClick")
                el-col.frame-col(:span="5")
                    kalix-tree(v-bind:treeTitle="'专业年级树'" v-bind:treeDataURL="majorGradeTreeURL"  v-on:nodeClick="onTreeClick1")
</template>

<script type="text/ecmascript-6">
    import {gradeMajorTreeURL, majorGradeTreeURL} from '../../config.toml'

    export default {
        name: 'kalix-admin-grademajortree',
        data() {
            return {
                gradeMajorTreeURL: gradeMajorTreeURL,
                majorGradeTreeURL: majorGradeTreeURL,
                gradeId: null,
                grade: '',
                majorId: null,
                majorName: '',
                dialogOptions: {}
            }
        },
        components: {},
        created() {
        },
        methods: {
            onTreeClick(data) {
                this.majorId = data.id
                this.majorName = data.name
                this.dialogOptions = {
                }
            },
            onTreeClick1(data) {
                console.log('treenodedata========', data)
                this.gradeId = data.id
                this.grade = data.name
                alert(this.gradeId)
                alert(this.grade)
                this.dialogOptions = {
                }
            }
        }
    }
</script>

<style scoped lang="stylus">
</style>
